<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Linear code</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Linear_code"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Linear_code rootpage-Linear_code skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Linear code</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p>In <a href="Coding_theory" title="Coding theory">coding theory</a>, a <b>linear code</b> is an <a href="Error-correcting_code" class="mw-redirect" title="Error-correcting code">error-correcting code</a> for which any <a href="Linear_combination" title="Linear combination">linear combination</a> of <a href="Code_word_(communication)" title="Code word (communication)">codewords</a> is also a codeword. Linear codes are traditionally partitioned into <a href="Block_code" title="Block code">block codes</a> and <a href="Convolutional_code" title="Convolutional code">convolutional codes</a>, although <a href="Turbo_code" title="Turbo code">turbo codes</a> can be seen as a hybrid of these two types.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> Linear codes allow for more efficient encoding and decoding algorithms than other codes (cf. <a href="Syndrome_decoding" class="mw-redirect" title="Syndrome decoding">syndrome decoding</a>).
</p><p>Linear codes are used in <a href="Forward_error_correction" class="mw-redirect" title="Forward error correction">forward error correction</a> and are applied in methods for transmitting symbols (e.g., <a href="Bit" title="Bit">bits</a>) on a <a href="Communications_channel" class="mw-redirect" title="Communications channel">communications channel</a> so that, if errors occur in the communication, some errors can be corrected or detected by the recipient of a message block. The codewords in a linear block code are blocks of symbols that are encoded using more symbols than the original value to be sent.<sup id="cite_ref-DrMacKayECC_2-0" class="reference"><a href="#cite_note-DrMacKayECC-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> A linear code of length <i>n</i> transmits blocks containing <i>n</i> symbols. For example, the [7,4,3] <a href="Hamming_code" title="Hamming code">Hamming code</a> is a linear <a href="Binary_code" title="Binary code">binary code</a> which represents 4-bit messages using 7-bit codewords. Two distinct codewords differ in at least three bits. As a consequence, up to two errors per codeword can be detected while a single error can be corrected.<sup id="cite_ref-Cover_and_Thomas_3-0" class="reference"><a href="#cite_note-Cover_and_Thomas-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> This code contains 2<sup>4</sup> = 16 codewords.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Definition_and_parameters">Definition and parameters</h2></div>
<p>A <b>linear code</b> of length <i>n</i> and dimension <i>k</i> is a <a href="Linear_subspace" title="Linear subspace">linear subspace</a> <i>C</i> with <a href="Dimension_(linear_algebra)" class="mw-redirect" title="Dimension (linear algebra)">dimension</a> <i>k</i> of the <a href="Vector_space" title="Vector space">vector space</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {F} _{q}^{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">F</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>q</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {F} _{q}^{n}}</annotation>
</semantics>
</math></span><img src="./0a630603c6f2f8f58f5d1fb9ef1b9ad194e258a2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:2.639ex; height:3.176ex;" alt="{\displaystyle \mathbb {F} _{q}^{n}}" loading="lazy"></span> where <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {F} _{q}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">F</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>q</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {F} _{q}}</annotation>
</semantics>
</math></span><img src="./dbb96e056c071d13fc7702013f9273e7f5cd88a7.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:2.409ex; height:2.843ex;" alt="{\displaystyle \mathbb {F} _{q}}" loading="lazy"></span> is the <a href="Finite_field" title="Finite field">finite field</a> with <i>q</i> elements. Such a code is called a <i>q</i>-ary code. If <i>q</i> = 2 or <i>q</i> = 3, the code is described as a <b>binary code</b>, or a <b>ternary code</b> respectively. The vectors in <i>C</i> are called <i>codewords</i>. The <b>size</b> of a code is the number of codewords and equals <i>q</i><sup><i>k</i></sup>.
</p><p>The <b>weight</b> of a codeword is the number of its elements that are nonzero and the <b>distance</b> between two codewords is the <a href="Hamming_distance" title="Hamming distance">Hamming distance</a> between them, that is, the number of elements in which they differ. The distance <i>d</i> of the linear code is the minimum weight of its nonzero codewords, or equivalently, the minimum distance between distinct codewords. A linear code of length <i>n</i>, dimension <i>k</i>, and distance <i>d</i> is called an [<i>n</i>,<i>k</i>,<i>d</i>] code (or, more precisely, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle [n,k,d]_{q}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">[</mo>
<mi>n</mi>
<mo>,</mo>
<mi>k</mi>
<mo>,</mo>
<mi>d</mi>
<msub>
<mo stretchy="false">]</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>q</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle [n,k,d]_{q}}</annotation>
</semantics>
</math></span><img src="./5eef76e1d6b74cc535236a6249e75afeea540ee3.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:8.172ex; height:3.009ex;" alt="{\displaystyle [n,k,d]_{q}}" loading="lazy"></span> code).
</p><p>We want to give <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {F} _{q}^{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">F</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>q</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {F} _{q}^{n}}</annotation>
</semantics>
</math></span><img src="./0a630603c6f2f8f58f5d1fb9ef1b9ad194e258a2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:2.639ex; height:3.176ex;" alt="{\displaystyle \mathbb {F} _{q}^{n}}" loading="lazy"></span> the standard basis because each coordinate represents a "bit" that is transmitted across a "noisy channel" with some small probability of transmission error (a <a href="Binary_symmetric_channel" title="Binary symmetric channel">binary symmetric channel</a>). If some other basis is used then this model cannot be used and the Hamming metric does not measure the number of errors in transmission, as we want it to.
</p>
<div class="mw-heading mw-heading2"><h2 id="Generator_and_check_matrices">Generator and check matrices</h2></div>
<p>As a <a href="Linear_subspace" title="Linear subspace">linear subspace</a> of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {F} _{q}^{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">F</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>q</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {F} _{q}^{n}}</annotation>
</semantics>
</math></span><img src="./0a630603c6f2f8f58f5d1fb9ef1b9ad194e258a2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:2.639ex; height:3.176ex;" alt="{\displaystyle \mathbb {F} _{q}^{n}}" loading="lazy"></span>, the entire code <i>C</i> (which may be very large) may be represented as the <a href="Span_(linear_algebra)" class="mw-redirect" title="Span (linear algebra)">span</a> of a set of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k}</annotation>
</semantics>
</math></span><img src="./c3c9a2c7b599b37105512c5d570edc034056dd40.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.211ex; height:2.176ex;" alt="{\displaystyle k}" loading="lazy"></span> codewords (known as a <a href="Basis_(linear_algebra)" title="Basis (linear algebra)">basis</a> in <a href="Linear_algebra" title="Linear algebra">linear algebra</a>). These basis codewords are often collated in the rows of a matrix G known as a <b><a href="Generator_matrix" title="Generator matrix">generating matrix</a></b> for the code <i>C</i>. When G has the block matrix form <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {G}}=[I_{k}\mid P]}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">G</mi>
</mrow>
<mo>=</mo>
<mo stretchy="false">[</mo>
<msub>
<mi>I</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msub>
<mo>∣<!-- ∣ --></mo>
<mi>P</mi>
<mo stretchy="false">]</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {G}}=[I_{k}\mid P]}</annotation>
</semantics>
</math></span><img src="./5b39eaa9d4bc1afb615e3e7c87e7f27ed430f802.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:12.248ex; height:2.843ex;" alt="{\displaystyle {\boldsymbol {G}}=[I_{k}\mid P]}" loading="lazy"></span>, where <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle I_{k}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>I</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle I_{k}}</annotation>
</semantics>
</math></span><img src="./d658e7f6b34dd1d3025a7c9a72efba5b9f46475d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.112ex; height:2.509ex;" alt="{\displaystyle I_{k}}" loading="lazy"></span> denotes the <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k\times k}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
<mo>×<!-- × --></mo>
<mi>k</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k\times k}</annotation>
</semantics>
</math></span><img src="./77bcf9346bcb189917b6b49c4331b4483f4a4a2c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.263ex; height:2.176ex;" alt="{\displaystyle k\times k}" loading="lazy"></span> identity matrix and P is some <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k\times (n-k)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
<mo>×<!-- × --></mo>
<mo stretchy="false">(</mo>
<mi>n</mi>
<mo>−<!-- − --></mo>
<mi>k</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k\times (n-k)}</annotation>
</semantics>
</math></span><img src="./d51ee3484090b09ef1b37bf5d836003e8c749c92.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.307ex; height:2.843ex;" alt="{\displaystyle k\times (n-k)}" loading="lazy"></span> matrix, then we say G is in <b>standard form</b>.
</p><p>A matrix <i>H</i> representing a linear function <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \phi :\mathbb {F} _{q}^{n}\to \mathbb {F} _{q}^{n-k}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>ϕ<!-- ϕ --></mi>
<mo>:</mo>
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">F</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>q</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msubsup>
<mo stretchy="false">→<!-- → --></mo>
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">F</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>q</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>−<!-- − --></mo>
<mi>k</mi>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \phi :\mathbb {F} _{q}^{n}\to \mathbb {F} _{q}^{n-k}}</annotation>
</semantics>
</math></span><img src="./484392e557c808d41b928fdc48db15ed81cb117d.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:14.349ex; height:3.509ex;" alt="{\displaystyle \phi :\mathbb {F} _{q}^{n}\to \mathbb {F} _{q}^{n-k}}" loading="lazy"></span> whose <a href="Kernel_(matrix)" class="mw-redirect" title="Kernel (matrix)">kernel</a> is <i>C</i> is called a <b><a href="Check_matrix" class="mw-redirect" title="Check matrix">check matrix</a></b> of <i>C</i> (or sometimes a parity check matrix). Equivalently, <i>H</i> is a matrix whose <a href="Null_space" class="mw-redirect" title="Null space">null space</a> is <i>C</i>. If <i>C</i> is a code with a generating matrix <i>G</i> in standard form, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {G}}=[I_{k}\mid P]}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">G</mi>
</mrow>
<mo>=</mo>
<mo stretchy="false">[</mo>
<msub>
<mi>I</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>k</mi>
</mrow>
</msub>
<mo>∣<!-- ∣ --></mo>
<mi>P</mi>
<mo stretchy="false">]</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {G}}=[I_{k}\mid P]}</annotation>
</semantics>
</math></span><img src="./5b39eaa9d4bc1afb615e3e7c87e7f27ed430f802.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:12.248ex; height:2.843ex;" alt="{\displaystyle {\boldsymbol {G}}=[I_{k}\mid P]}" loading="lazy"></span>, then <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {H}}=[-P^{T}\mid I_{n-k}]}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">H</mi>
</mrow>
<mo>=</mo>
<mo stretchy="false">[</mo>
<mo>−<!-- − --></mo>
<msup>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>T</mi>
</mrow>
</msup>
<mo>∣<!-- ∣ --></mo>
<msub>
<mi>I</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
<mo>−<!-- − --></mo>
<mi>k</mi>
</mrow>
</msub>
<mo stretchy="false">]</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {H}}=[-P^{T}\mid I_{n-k}]}</annotation>
</semantics>
</math></span><img src="./e0803113fbe897fdac6c61f3ad26149897d2170a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:18.111ex; height:3.176ex;" alt="{\displaystyle {\boldsymbol {H}}=[-P^{T}\mid I_{n-k}]}" loading="lazy"></span> is a check matrix for C. The code generated by <i>H</i> is called the <b>dual code</b> of C. It can be verified that G is a <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k\times n}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
<mo>×<!-- × --></mo>
<mi>n</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k\times n}</annotation>
</semantics>
</math></span><img src="./8e173885ca0f29dd406df781144cd635276c68e1.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.446ex; height:2.176ex;" alt="{\displaystyle k\times n}" loading="lazy"></span> matrix, while H is a <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle (n-k)\times n}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">(</mo>
<mi>n</mi>
<mo>−<!-- − --></mo>
<mi>k</mi>
<mo stretchy="false">)</mo>
<mo>×<!-- × --></mo>
<mi>n</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle (n-k)\times n}</annotation>
</semantics>
</math></span><img src="./81d0ce9df55fbd0d24d52ac92f007cb08147ab87.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.491ex; height:2.843ex;" alt="{\displaystyle (n-k)\times n}" loading="lazy"></span> matrix.
</p><p>Linearity guarantees that the minimum <a href="Hamming_distance" title="Hamming distance">Hamming distance</a> <i>d</i> between a codeword <i>c</i><sub>0</sub> and any of the other codewords <i>c</i> ≠ <i>c</i><sub>0</sub> is independent of <i>c</i><sub>0</sub>. This follows from the property that the difference <i>c</i> − <i>c</i><sub>0</sub> of two codewords in <i>C</i> is also a codeword (i.e., an <a href="Element_(mathematics)" title="Element (mathematics)">element</a> of the subspace <i>C</i>), and the property that <i>d</i>(<i>c</i>, c<sub>0</sub>) = <i>d</i>(<i>c</i> − <i>c</i><sub>0</sub>, 0). These properties imply that
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \min _{c\in C,\ c\neq c_{0}}d(c,c_{0})=\min _{c\in C,\ c\neq c_{0}}d(c-c_{0},0)=\min _{c\in C,\ c\neq 0}d(c,0)=d.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<munder>
<mo movablelimits="true" form="prefix">min</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>c</mi>
<mo>∈<!-- ∈ --></mo>
<mi>C</mi>
<mo>,</mo>
<mtext> </mtext>
<mi>c</mi>
<mo>≠<!-- ≠ --></mo>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
</mrow>
</munder>
<mi>d</mi>
<mo stretchy="false">(</mo>
<mi>c</mi>
<mo>,</mo>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
<mo stretchy="false">)</mo>
<mo>=</mo>
<munder>
<mo movablelimits="true" form="prefix">min</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>c</mi>
<mo>∈<!-- ∈ --></mo>
<mi>C</mi>
<mo>,</mo>
<mtext> </mtext>
<mi>c</mi>
<mo>≠<!-- ≠ --></mo>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
</mrow>
</munder>
<mi>d</mi>
<mo stretchy="false">(</mo>
<mi>c</mi>
<mo>−<!-- − --></mo>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>0</mn>
</mrow>
</msub>
<mo>,</mo>
<mn>0</mn>
<mo stretchy="false">)</mo>
<mo>=</mo>
<munder>
<mo movablelimits="true" form="prefix">min</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>c</mi>
<mo>∈<!-- ∈ --></mo>
<mi>C</mi>
<mo>,</mo>
<mtext> </mtext>
<mi>c</mi>
<mo>≠<!-- ≠ --></mo>
<mn>0</mn>
</mrow>
</munder>
<mi>d</mi>
<mo stretchy="false">(</mo>
<mi>c</mi>
<mo>,</mo>
<mn>0</mn>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mi>d</mi>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \min _{c\in C,\ c\neq c_{0}}d(c,c_{0})=\min _{c\in C,\ c\neq c_{0}}d(c-c_{0},0)=\min _{c\in C,\ c\neq 0}d(c,0)=d.}</annotation>
</semantics>
</math></span><img src="./f245d1d0b4e45912c1614448d5a9a5bd724c3885.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:58.971ex; height:4.343ex;" alt="{\displaystyle \min _{c\in C,\ c\neq c_{0}}d(c,c_{0})=\min _{c\in C,\ c\neq c_{0}}d(c-c_{0},0)=\min _{c\in C,\ c\neq 0}d(c,0)=d.}" loading="lazy"></span></dd></dl>
<p>In other words, in order to find out the minimum distance between the codewords of a linear code, one would only need to look at the non-zero codewords. The non-zero codeword with the smallest weight has then the minimum distance to the zero codeword, and hence determines the minimum distance of the code.
</p><p>The distance <i>d</i> of a linear code <i>C</i> also equals the minimum number of linearly dependent columns of the check matrix <i>H</i>.
</p><p><i>Proof:</i> Because <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {H}}\cdot {\boldsymbol {c}}^{T}={\boldsymbol {0}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">H</mi>
</mrow>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">c</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>T</mi>
</mrow>
</msup>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="bold">0</mn>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {H}}\cdot {\boldsymbol {c}}^{T}={\boldsymbol {0}}}</annotation>
</semantics>
</math></span><img src="./59a2e4e9bdd290d3e70dfcbbab04ae2dd641f328.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:11.083ex; height:2.676ex;" alt="{\displaystyle {\boldsymbol {H}}\cdot {\boldsymbol {c}}^{T}={\boldsymbol {0}}}" loading="lazy"></span>, which is equivalent to <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{i=1}^{n}(c_{i}\cdot {\boldsymbol {H_{i}}})={\boldsymbol {0}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<munderover>
<mo>∑<!-- ∑ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
<mo>=</mo>
<mn>1</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</munderover>
<mo stretchy="false">(</mo>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>⋅<!-- ⋅ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi mathvariant="bold-italic">H</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">i</mi>
</mrow>
</msub>
</mrow>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="bold">0</mn>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \sum _{i=1}^{n}(c_{i}\cdot {\boldsymbol {H_{i}}})={\boldsymbol {0}}}</annotation>
</semantics>
</math></span><img src="./eecbe07fcf648b44c7430a12984885001df63573.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.005ex; width:16.265ex; height:6.843ex;" alt="{\displaystyle \sum _{i=1}^{n}(c_{i}\cdot {\boldsymbol {H_{i}}})={\boldsymbol {0}}}" loading="lazy"></span>, where <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {H_{i}}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi mathvariant="bold-italic">H</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">i</mi>
</mrow>
</msub>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {H_{i}}}}</annotation>
</semantics>
</math></span><img src="./de05004cf99eb4f93e8af5f5dc388ae45e184682.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.18ex; height:2.509ex;" alt="{\displaystyle {\boldsymbol {H_{i}}}}" loading="lazy"></span> is the <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i^{th}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>i</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>t</mi>
<mi>h</mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i^{th}}</annotation>
</semantics>
</math></span><img src="./9c454bb35f050556d361ee85e06ca923b16a3bf4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.575ex; height:2.676ex;" alt="{\displaystyle i^{th}}" loading="lazy"></span> column of <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {H}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">H</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {H}}}</annotation>
</semantics>
</math></span><img src="./73c9e11c17393610f4fc50c817c929d95349fa7a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.386ex; height:2.176ex;" alt="{\displaystyle {\boldsymbol {H}}}" loading="lazy"></span>. Remove those items with <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c_{i}=0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>=</mo>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c_{i}=0}</annotation>
</semantics>
</math></span><img src="./06dbc33495a748ad5067cb6ff07cba653cffaf2c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:6.067ex; height:2.509ex;" alt="{\displaystyle c_{i}=0}" loading="lazy"></span>, those <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {H_{i}}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi mathvariant="bold-italic">H</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">i</mi>
</mrow>
</msub>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {H_{i}}}}</annotation>
</semantics>
</math></span><img src="./de05004cf99eb4f93e8af5f5dc388ae45e184682.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:3.18ex; height:2.509ex;" alt="{\displaystyle {\boldsymbol {H_{i}}}}" loading="lazy"></span> with <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c_{i}\neq 0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>≠<!-- ≠ --></mo>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c_{i}\neq 0}</annotation>
</semantics>
</math></span><img src="./bd8b02f63dd177fb17a45d4e0fdc6954826ac120.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:6.067ex; height:2.676ex;" alt="{\displaystyle c_{i}\neq 0}" loading="lazy"></span> are linearly dependent. Therefore, <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle d}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>d</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle d}</annotation>
</semantics>
</math></span><img src="./e85ff03cbe0c7341af6b982e47e9f90d235c66ab.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.216ex; height:2.176ex;" alt="{\displaystyle d}" loading="lazy"></span> is at least the minimum number of linearly dependent columns. On another hand, consider the minimum set of linearly dependent columns <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \{{\boldsymbol {H_{j}}}\mid j\in S\}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo fence="false" stretchy="false">{</mo>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi mathvariant="bold-italic">H</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">j</mi>
</mrow>
</msub>
</mrow>
<mo>∣<!-- ∣ --></mo>
<mi>j</mi>
<mo>∈<!-- ∈ --></mo>
<mi>S</mi>
<mo fence="false" stretchy="false">}</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \{{\boldsymbol {H_{j}}}\mid j\in S\}}</annotation>
</semantics>
</math></span><img src="./05f6d169a538acecae0d9b9e991a19801dfa1ce8.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:12.849ex; height:3.009ex;" alt="{\displaystyle \{{\boldsymbol {H_{j}}}\mid j\in S\}}" loading="lazy"></span> where <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle S}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>S</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle S}</annotation>
</semantics>
</math></span><img src="./4611d85173cd3b508e67077d4a1252c9c05abca2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.499ex; height:2.176ex;" alt="{\displaystyle S}" loading="lazy"></span> is the column index set. <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \sum _{i=1}^{n}(c_{i}\cdot {\boldsymbol {H_{i}}})=\sum _{j\in S}(c_{j}\cdot {\boldsymbol {H_{j}}})+\sum _{j\notin S}(c_{j}\cdot {\boldsymbol {H_{j}}})={\boldsymbol {0}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<munderover>
<mo>∑<!-- ∑ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
<mo>=</mo>
<mn>1</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</munderover>
<mo stretchy="false">(</mo>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>i</mi>
</mrow>
</msub>
<mo>⋅<!-- ⋅ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi mathvariant="bold-italic">H</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">i</mi>
</mrow>
</msub>
</mrow>
<mo stretchy="false">)</mo>
<mo>=</mo>
<munder>
<mo>∑<!-- ∑ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>j</mi>
<mo>∈<!-- ∈ --></mo>
<mi>S</mi>
</mrow>
</munder>
<mo stretchy="false">(</mo>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>j</mi>
</mrow>
</msub>
<mo>⋅<!-- ⋅ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi mathvariant="bold-italic">H</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">j</mi>
</mrow>
</msub>
</mrow>
<mo stretchy="false">)</mo>
<mo>+</mo>
<munder>
<mo>∑<!-- ∑ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mi>j</mi>
<mo>∉<!-- ∉ --></mo>
<mi>S</mi>
</mrow>
</munder>
<mo stretchy="false">(</mo>
<msub>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>j</mi>
</mrow>
</msub>
<mo>⋅<!-- ⋅ --></mo>
<mrow class="MJX-TeXAtom-ORD">
<msub>
<mi mathvariant="bold-italic">H</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">j</mi>
</mrow>
</msub>
</mrow>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="bold">0</mn>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \sum _{i=1}^{n}(c_{i}\cdot {\boldsymbol {H_{i}}})=\sum _{j\in S}(c_{j}\cdot {\boldsymbol {H_{j}}})+\sum _{j\notin S}(c_{j}\cdot {\boldsymbol {H_{j}}})={\boldsymbol {0}}}</annotation>
</semantics>
</math></span><img src="./c35f918554e1c0e266bd68400182df96f7a4a9b5.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -3.505ex; width:46.301ex; height:7.343ex;" alt="{\displaystyle \sum _{i=1}^{n}(c_{i}\cdot {\boldsymbol {H_{i}}})=\sum _{j\in S}(c_{j}\cdot {\boldsymbol {H_{j}}})+\sum _{j\notin S}(c_{j}\cdot {\boldsymbol {H_{j}}})={\boldsymbol {0}}}" loading="lazy"></span>. Now consider the vector <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {c'}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<msup>
<mi mathvariant="bold-italic">c</mi>
<mo mathvariant="bold">′</mo>
</msup>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {c'}}}</annotation>
</semantics>
</math></span><img src="./ad3e4b2dcb9bfc46b88d7de0541d264fb002ce30.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.877ex; height:2.509ex;" alt="{\displaystyle {\boldsymbol {c'}}}" loading="lazy"></span> such that <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle c_{j}'=0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mi>c</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>j</mi>
</mrow>
<mo>′</mo>
</msubsup>
<mo>=</mo>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle c_{j}'=0}</annotation>
</semantics>
</math></span><img src="./0abdd51d3d63d06e78fa606be7cab9cbe09d4ac5.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.338ex; width:6.177ex; height:3.176ex;" alt="{\displaystyle c_{j}'=0}" loading="lazy"></span> if <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle j\notin S}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>j</mi>
<mo>∉<!-- ∉ --></mo>
<mi>S</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle j\notin S}</annotation>
</semantics>
</math></span><img src="./7f3d7bea9a2d042e11b262747f18ba254a6f421a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; margin-left: -0.027ex; width:5.325ex; height:2.676ex;" alt="{\displaystyle j\notin S}" loading="lazy"></span>. Note <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {c'}}\in C}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<msup>
<mi mathvariant="bold-italic">c</mi>
<mo mathvariant="bold">′</mo>
</msup>
</mrow>
<mo>∈<!-- ∈ --></mo>
<mi>C</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {c'}}\in C}</annotation>
</semantics>
</math></span><img src="./1c98a74d8c8b2668ec78a6ca38829420dc08d39b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.484ex; height:2.509ex;" alt="{\displaystyle {\boldsymbol {c'}}\in C}" loading="lazy"></span> because <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {H}}\cdot {\boldsymbol {c'}}^{T}={\boldsymbol {0}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">H</mi>
</mrow>
<mo>⋅<!-- ⋅ --></mo>
<msup>
<mrow class="MJX-TeXAtom-ORD">
<msup>
<mi mathvariant="bold-italic">c</mi>
<mo mathvariant="bold">′</mo>
</msup>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>T</mi>
</mrow>
</msup>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mn mathvariant="bold">0</mn>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {H}}\cdot {\boldsymbol {c'}}^{T}={\boldsymbol {0}}}</annotation>
</semantics>
</math></span><img src="./f137a6d5f9634ffe9efbc42b38620412d57639f5.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:11.767ex; height:3.009ex;" alt="{\displaystyle {\boldsymbol {H}}\cdot {\boldsymbol {c'}}^{T}={\boldsymbol {0}}}" loading="lazy"></span> . Therefore, we have <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle d\leq wt({\boldsymbol {c'}})}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>d</mi>
<mo>≤<!-- ≤ --></mo>
<mi>w</mi>
<mi>t</mi>
<mo stretchy="false">(</mo>
<mrow class="MJX-TeXAtom-ORD">
<msup>
<mi mathvariant="bold-italic">c</mi>
<mo mathvariant="bold">′</mo>
</msup>
</mrow>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle d\leq wt({\boldsymbol {c'}})}</annotation>
</semantics>
</math></span><img src="./dd462f57eddb44be78e1c6ce5130910915bcd5af.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:10.505ex; height:3.009ex;" alt="{\displaystyle d\leq wt({\boldsymbol {c'}})}" loading="lazy"></span>, which is the minimum number of linearly dependent columns in <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {H}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">H</mi>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {H}}}</annotation>
</semantics>
</math></span><img src="./73c9e11c17393610f4fc50c817c929d95349fa7a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.386ex; height:2.176ex;" alt="{\displaystyle {\boldsymbol {H}}}" loading="lazy"></span>. The claimed property is therefore proven.
</p>
<div class="mw-heading mw-heading2"><h2 id="Example:_Hamming_codes">Example: Hamming codes</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Hamming_code" title="Hamming code">Hamming code</a></div>
<p>As the first class of linear codes developed for error correction purpose, <a href="Hamming_code" title="Hamming code"><i>Hamming codes</i></a> have been widely used in digital communication systems. For any positive integer <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle r\geq 2}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>r</mi>
<mo>≥<!-- ≥ --></mo>
<mn>2</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle r\geq 2}</annotation>
</semantics>
</math></span><img src="./514b8e859c803190ff03bb1b308e352195311171.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:5.31ex; height:2.343ex;" alt="{\displaystyle r\geq 2}" loading="lazy"></span>, there exists a <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle [2^{r}-1,2^{r}-r-1,3]_{2}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">[</mo>
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>r</mi>
</mrow>
</msup>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo>,</mo>
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>r</mi>
</mrow>
</msup>
<mo>−<!-- − --></mo>
<mi>r</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo>,</mo>
<mn>3</mn>
<msub>
<mo stretchy="false">]</mo>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle [2^{r}-1,2^{r}-r-1,3]_{2}}</annotation>
</semantics>
</math></span><img src="./f4b7099796302beb1cea00796f3d9a67b448e08c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:21.745ex; height:2.843ex;" alt="{\displaystyle [2^{r}-1,2^{r}-r-1,3]_{2}}" loading="lazy"></span> Hamming code. Since <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle d=3}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>d</mi>
<mo>=</mo>
<mn>3</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle d=3}</annotation>
</semantics>
</math></span><img src="./58a4a6128b5cc1e25fcba3a16cbd9126b2d3e2fc.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.477ex; height:2.176ex;" alt="{\displaystyle d=3}" loading="lazy"></span>, this Hamming code can correct a 1-bit error.
</p><p><b>Example :</b> The linear block code with the following generator matrix and parity check matrix is a <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle [7,4,3]_{2}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">[</mo>
<mn>7</mn>
<mo>,</mo>
<mn>4</mn>
<mo>,</mo>
<mn>3</mn>
<msub>
<mo stretchy="false">]</mo>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle [7,4,3]_{2}}</annotation>
</semantics>
</math></span><img src="./499457f6464e18a49d7e72d66681299c4862829a.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.903ex; height:2.843ex;" alt="{\displaystyle [7,4,3]_{2}}" loading="lazy"></span> Hamming code.
</p>
<dl><dd><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {G}}={\begin{pmatrix}1&0&0&0&1&1&0\\0&1&0&0&0&1&1\\0&0&1&0&1&1&1\\0&0&0&1&1&0&1\end{pmatrix}},}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">G</mi>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>(</mo>
<mtable rowspacing="4pt" columnspacing="1em">
<mtr>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
</mtable>
<mo>)</mo>
</mrow>
</mrow>
<mo>,</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {G}}={\begin{pmatrix}1&0&0&0&1&1&0\\0&1&0&0&0&1&1\\0&0&1&0&1&1&1\\0&0&0&1&1&0&1\end{pmatrix}},}</annotation>
</semantics>
</math></span><img src="./5d370698ad59ac24b23462851b3fda25f4820d6e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -5.671ex; width:32.698ex; height:12.509ex;" alt="{\displaystyle {\boldsymbol {G}}={\begin{pmatrix}1&0&0&0&1&1&0\\0&1&0&0&0&1&1\\0&0&1&0&1&1&1\\0&0&0&1&1&0&1\end{pmatrix}},}" loading="lazy"></span> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {H}}={\begin{pmatrix}1&0&1&1&1&0&0\\1&1&\ 1&0&0&1&0\\0&1&1&1&0&0&1\end{pmatrix}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">H</mi>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>(</mo>
<mtable rowspacing="4pt" columnspacing="1em">
<mtr>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mtext> </mtext>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
</mtable>
<mo>)</mo>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {H}}={\begin{pmatrix}1&0&1&1&1&0&0\\1&1&\ 1&0&0&1&0\\0&1&1&1&0&0&1\end{pmatrix}}}</annotation>
</semantics>
</math></span><img src="./e155c053be98634b9a831bbe6c00b8be5dad34bd.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -4.005ex; width:32.957ex; height:9.176ex;" alt="{\displaystyle {\boldsymbol {H}}={\begin{pmatrix}1&0&1&1&1&0&0\\1&1&\ 1&0&0&1&0\\0&1&1&1&0&0&1\end{pmatrix}}}" loading="lazy"></span></dd></dl>
<div class="mw-heading mw-heading2"><h2 id="Example:_Hadamard_codes">Example: Hadamard codes</h2></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Hadamard_code" title="Hadamard code">Hadamard code</a></div>
<p><a href="Hadamard_code" title="Hadamard code">Hadamard code</a> is a <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle [2^{r},r,2^{r-1}]_{2}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">[</mo>
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>r</mi>
</mrow>
</msup>
<mo>,</mo>
<mi>r</mi>
<mo>,</mo>
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>r</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msup>
<msub>
<mo stretchy="false">]</mo>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle [2^{r},r,2^{r-1}]_{2}}</annotation>
</semantics>
</math></span><img src="./e698d84a6a5cfe250e1e1831a36917bc5f6dbc60.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.837ex; height:3.176ex;" alt="{\displaystyle [2^{r},r,2^{r-1}]_{2}}" loading="lazy"></span> linear code and is capable of correcting many errors. Hadamard code could be constructed column by column : the <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i^{th}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mi>i</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>t</mi>
<mi>h</mi>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i^{th}}</annotation>
</semantics>
</math></span><img src="./9c454bb35f050556d361ee85e06ca923b16a3bf4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.575ex; height:2.676ex;" alt="{\displaystyle i^{th}}" loading="lazy"></span> column is the bits of the binary representation of integer <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle i}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>i</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle i}</annotation>
</semantics>
</math></span><img src="./add78d8608ad86e54951b8c8bd6c8d8416533d20.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.802ex; height:2.176ex;" alt="{\displaystyle i}" loading="lazy"></span>, as shown in the following example. Hadamard code has minimum distance <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 2^{r-1}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>r</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
</msup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 2^{r-1}}</annotation>
</semantics>
</math></span><img src="./30c47034cc5f821de5d23f7648dc5fba876f6f99.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:4.237ex; height:2.676ex;" alt="{\displaystyle 2^{r-1}}" loading="lazy"></span> and therefore can correct <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle 2^{r-2}-1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msup>
<mn>2</mn>
<mrow class="MJX-TeXAtom-ORD">
<mi>r</mi>
<mo>−<!-- − --></mo>
<mn>2</mn>
</mrow>
</msup>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle 2^{r-2}-1}</annotation>
</semantics>
</math></span><img src="./6624d45afe13d5b0b1ae6ea0837e9911c5bb74fe.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:8.24ex; height:2.843ex;" alt="{\displaystyle 2^{r-2}-1}" loading="lazy"></span> errors.
</p><p><b>Example:</b> The linear block code with the following generator matrix is a <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle [8,3,4]_{2}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">[</mo>
<mn>8</mn>
<mo>,</mo>
<mn>3</mn>
<mo>,</mo>
<mn>4</mn>
<msub>
<mo stretchy="false">]</mo>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle [8,3,4]_{2}}</annotation>
</semantics>
</math></span><img src="./25e2abe070a736c1d85fc3d68f41ad9d65cc9a85.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.903ex; height:2.843ex;" alt="{\displaystyle [8,3,4]_{2}}" loading="lazy"></span> Hadamard code:
<span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {G}}_{\mathrm {Had} }={\begin{pmatrix}0&0&0&0&1&\ 1&1&1\\0&0&1&1&0&0&1&1\\0&1&0&1&0&1&0&1\end{pmatrix}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">G</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">H</mi>
<mi mathvariant="normal">a</mi>
<mi mathvariant="normal">d</mi>
</mrow>
</mrow>
</msub>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mrow>
<mo>(</mo>
<mtable rowspacing="4pt" columnspacing="1em">
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mtext> </mtext>
<mn>1</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
<mtd>
<mn>0</mn>
</mtd>
<mtd>
<mn>1</mn>
</mtd>
</mtr>
</mtable>
<mo>)</mo>
</mrow>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {G}}_{\mathrm {Had} }={\begin{pmatrix}0&0&0&0&1&\ 1&1&1\\0&0&1&1&0&0&1&1\\0&1&0&1&0&1&0&1\end{pmatrix}}}</annotation>
</semantics>
</math></span><img src="./f48afd81a8533c6c2564fa63868edae157751516.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -4.005ex; width:39.317ex; height:9.176ex;" alt="{\displaystyle {\boldsymbol {G}}_{\mathrm {Had} }={\begin{pmatrix}0&0&0&0&1&\ 1&1&1\\0&0&1&1&0&0&1&1\\0&1&0&1&0&1&0&1\end{pmatrix}}}" loading="lazy"></span>.
</p><p><a href="Hadamard_code" title="Hadamard code">Hadamard code</a> is a special case of <a href="Reed%E2%80%93Muller_code" title="Reed–Muller code">Reed–Muller code</a>. If we take the first column (the all-zero column) out from <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\boldsymbol {G}}_{\mathrm {Had} }}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="bold-italic">G</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="normal">H</mi>
<mi mathvariant="normal">a</mi>
<mi mathvariant="normal">d</mi>
</mrow>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\boldsymbol {G}}_{\mathrm {Had} }}</annotation>
</semantics>
</math></span><img src="./f3ca78d76d82631ea84fdd6c7d1c5aaf90be76dd.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:5.262ex; height:2.509ex;" alt="{\displaystyle {\boldsymbol {G}}_{\mathrm {Had} }}" loading="lazy"></span>, we get <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle [7,3,4]_{2}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mo stretchy="false">[</mo>
<mn>7</mn>
<mo>,</mo>
<mn>3</mn>
<mo>,</mo>
<mn>4</mn>
<msub>
<mo stretchy="false">]</mo>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle [7,3,4]_{2}}</annotation>
</semantics>
</math></span><img src="./61062d9e8384323c74a528929abb584e5c30caba.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:7.903ex; height:2.843ex;" alt="{\displaystyle [7,3,4]_{2}}" loading="lazy"></span> <i>simplex code</i>, which is the <i>dual code </i> of Hamming code.
</p>
<div class="mw-heading mw-heading2"><h2 id="Nearest_neighbor_algorithm">Nearest neighbor algorithm</h2></div>
<p>The parameter d is closely related to the error correcting ability of the code. The following construction/algorithm illustrates this (called the nearest neighbor decoding algorithm):
</p><p>Input: A <i>received vector</i> v in <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {F} _{q}^{n}.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">F</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>q</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msubsup>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {F} _{q}^{n}.}</annotation>
</semantics>
</math></span><img src="./b3ce3fcf0b32ad2bee8682b297868d6634339a74.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:3.286ex; height:3.176ex;" alt="{\displaystyle \mathbb {F} _{q}^{n}.}" loading="lazy"></span>
</p><p>Output: A codeword <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle w}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>w</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle w}</annotation>
</semantics>
</math></span><img src="./88b1e0c8e1be5ebe69d18a8010676fa42d7961e6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.664ex; height:1.676ex;" alt="{\displaystyle w}" loading="lazy"></span> in <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle C}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>C</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle C}</annotation>
</semantics>
</math></span><img src="./4fc55753007cd3c18576f7933f6f089196732029.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.766ex; height:2.176ex;" alt="{\displaystyle C}" loading="lazy"></span> closest to <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle v}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>v</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle v}</annotation>
</semantics>
</math></span><img src="./e07b00e7fc0847fbd16391c778d65bc25c452597.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.128ex; height:1.676ex;" alt="{\displaystyle v}" loading="lazy"></span>, if any.
</p>
<ul><li>Starting with <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t=0}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>t</mi>
<mo>=</mo>
<mn>0</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle t=0}</annotation>
</semantics>
</math></span><img src="./43469ec032d858feae5aa87029e22eaaf0109e9c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.101ex; height:2.176ex;" alt="{\displaystyle t=0}" loading="lazy"></span>, repeat the following two steps.</li>
<li>Enumerate the elements of the ball of (Hamming) radius <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>t</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle t}</annotation>
</semantics>
</math></span><img src="./65658b7b223af9e1acc877d848888ecdb4466560.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.84ex; height:2.009ex;" alt="{\displaystyle t}" loading="lazy"></span> around the received word <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle v}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>v</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle v}</annotation>
</semantics>
</math></span><img src="./e07b00e7fc0847fbd16391c778d65bc25c452597.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.128ex; height:1.676ex;" alt="{\displaystyle v}" loading="lazy"></span>, denoted <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle B_{t}(v)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>B</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>t</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>v</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle B_{t}(v)}</annotation>
</semantics>
</math></span><img src="./81f6258c1d7b73b2adc93cb6b2ddcc79093c24c0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.527ex; height:2.843ex;" alt="{\displaystyle B_{t}(v)}" loading="lazy"></span>.
<ul><li>For each <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle w}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>w</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle w}</annotation>
</semantics>
</math></span><img src="./88b1e0c8e1be5ebe69d18a8010676fa42d7961e6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.664ex; height:1.676ex;" alt="{\displaystyle w}" loading="lazy"></span> in <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle B_{t}(v)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>B</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>t</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>v</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle B_{t}(v)}</annotation>
</semantics>
</math></span><img src="./81f6258c1d7b73b2adc93cb6b2ddcc79093c24c0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.527ex; height:2.843ex;" alt="{\displaystyle B_{t}(v)}" loading="lazy"></span>, check if <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle w}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>w</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle w}</annotation>
</semantics>
</math></span><img src="./88b1e0c8e1be5ebe69d18a8010676fa42d7961e6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.664ex; height:1.676ex;" alt="{\displaystyle w}" loading="lazy"></span> in <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle C}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>C</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle C}</annotation>
</semantics>
</math></span><img src="./4fc55753007cd3c18576f7933f6f089196732029.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.766ex; height:2.176ex;" alt="{\displaystyle C}" loading="lazy"></span>. If so, return <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle w}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>w</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle w}</annotation>
</semantics>
</math></span><img src="./88b1e0c8e1be5ebe69d18a8010676fa42d7961e6.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.664ex; height:1.676ex;" alt="{\displaystyle w}" loading="lazy"></span> as the solution.</li></ul></li>
<li>Increment <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>t</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle t}</annotation>
</semantics>
</math></span><img src="./65658b7b223af9e1acc877d848888ecdb4466560.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.84ex; height:2.009ex;" alt="{\displaystyle t}" loading="lazy"></span>. Fail only when <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t>(d-1)/2}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>t</mi>
<mo>></mo>
<mo stretchy="false">(</mo>
<mi>d</mi>
<mo>−<!-- − --></mo>
<mn>1</mn>
<mo stretchy="false">)</mo>
<mrow class="MJX-TeXAtom-ORD">
<mo>/</mo>
</mrow>
<mn>2</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle t>(d-1)/2}</annotation>
</semantics>
</math></span><img src="./ae05ce0e484495be4dc9bcff1151de24d6d0147f.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:13.291ex; height:2.843ex;" alt="{\displaystyle t>(d-1)/2}" loading="lazy"></span> so enumeration is complete and no solution has been found.</li></ul>
<p>We say that a linear <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle C}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>C</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle C}</annotation>
</semantics>
</math></span><img src="./4fc55753007cd3c18576f7933f6f089196732029.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.766ex; height:2.176ex;" alt="{\displaystyle C}" loading="lazy"></span> is <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle t}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>t</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle t}</annotation>
</semantics>
</math></span><img src="./65658b7b223af9e1acc877d848888ecdb4466560.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:0.84ex; height:2.009ex;" alt="{\displaystyle t}" loading="lazy"></span>-error correcting if there is at most one codeword in <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle B_{t}(v)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>B</mi>
<mrow class="MJX-TeXAtom-ORD">
<mi>t</mi>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>v</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle B_{t}(v)}</annotation>
</semantics>
</math></span><img src="./81f6258c1d7b73b2adc93cb6b2ddcc79093c24c0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:5.527ex; height:2.843ex;" alt="{\displaystyle B_{t}(v)}" loading="lazy"></span>, for each <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle v}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>v</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle v}</annotation>
</semantics>
</math></span><img src="./e07b00e7fc0847fbd16391c778d65bc25c452597.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.128ex; height:1.676ex;" alt="{\displaystyle v}" loading="lazy"></span> in <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {F} _{q}^{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">F</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>q</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {F} _{q}^{n}}</annotation>
</semantics>
</math></span><img src="./0a630603c6f2f8f58f5d1fb9ef1b9ad194e258a2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:2.639ex; height:3.176ex;" alt="{\displaystyle \mathbb {F} _{q}^{n}}" loading="lazy"></span>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Popular_notation">Popular notation</h2></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Block_code#Popular_notation" title="Block code">Block code § Popular notation</a></div>
<p><a href="Code" title="Code">Codes</a> in general are often denoted by the letter <i>C</i>, and a code of length <i>n</i> and of <a href="Dimension_(linear_algebra)" class="mw-redirect" title="Dimension (linear algebra)">rank</a> <i>k</i> (i.e., having <i>n</i> code words in its basis and <i>k</i> rows in its <i>generating matrix</i>) is generally referred to as an (<i>n</i>, <i>k</i>) code. Linear block codes are frequently denoted as [<i>n</i>, <i>k</i>, <i>d</i>] codes, where <i>d</i> refers to the code's minimum Hamming distance between any two code words.
</p><p>(The [<i>n</i>, <i>k</i>, <i>d</i>] notation should not be confused with the (<i>n</i>, <i>M</i>, <i>d</i>) notation used to denote a <i>non-linear</i> code of length <i>n</i>, size <i>M</i> (i.e., having <i>M</i> code words), and minimum Hamming distance <i>d</i>.)
</p>
<div class="mw-heading mw-heading2"><h2 id="Singleton_bound">Singleton bound</h2></div>
<p><i>Lemma</i> (<a href="Singleton_bound" title="Singleton bound">Singleton bound</a>): Every linear [<i>n</i>,<i>k</i>,<i>d</i>] code C satisfies <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle k+d\leq n+1}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>k</mi>
<mo>+</mo>
<mi>d</mi>
<mo>≤<!-- ≤ --></mo>
<mi>n</mi>
<mo>+</mo>
<mn>1</mn>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle k+d\leq n+1}</annotation>
</semantics>
</math></span><img src="./39463061e873b658c8e124e85e178fadbdb850ee.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:13.764ex; height:2.343ex;" alt="{\displaystyle k+d\leq n+1}" loading="lazy"></span>.
</p><p>A code <i>C</i> whose parameters satisfy <i>k</i> +<i>d</i> = <i>n</i> + 1 is called <b>maximum distance separable</b> or <b>MDS</b>. Such codes, when they exist, are in some sense best possible.
</p><p>If <i>C</i><sub>1</sub> and <i>C</i><sub>2</sub> are two codes of length <i>n</i> and if there is a permutation <i>p</i> in the <a href="Symmetric_group" title="Symmetric group">symmetric group</a> <i>S</i><sub><i>n</i></sub> for which (<i>c</i><sub>1</sub>,...,<i>c</i><sub><i>n</i></sub>) in <i>C</i><sub>1</sub> if and only if (<i>c</i><sub><i>p</i>(1)</sub>,...,<i>c</i><sub><i>p</i>(<i>n</i>)</sub>) in <i>C</i><sub>2</sub>, then we say <i>C</i><sub>1</sub> and <i>C</i><sub>2</sub> are <b>permutation equivalent</b>. In more generality, if there is an <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n\times n}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>n</mi>
<mo>×<!-- × --></mo>
<mi>n</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle n\times n}</annotation>
</semantics>
</math></span><img src="./59d2b4cb72e304526cf5b5887147729ea259da78.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:5.63ex; height:1.676ex;" alt="{\displaystyle n\times n}" loading="lazy"></span> <a href="Monomial_matrix" class="mw-redirect" title="Monomial matrix">monomial matrix</a> <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle M\colon \mathbb {F} _{q}^{n}\to \mathbb {F} _{q}^{n}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>M</mi>
<mo>:<!-- : --></mo>
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">F</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>q</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msubsup>
<mo stretchy="false">→<!-- → --></mo>
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">F</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>q</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>n</mi>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle M\colon \mathbb {F} _{q}^{n}\to \mathbb {F} _{q}^{n}}</annotation>
</semantics>
</math></span><img src="./9bbc03238cc0c9aac68cf30aa22c22867ab82bc2.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.171ex; width:12.368ex; height:3.176ex;" alt="{\displaystyle M\colon \mathbb {F} _{q}^{n}\to \mathbb {F} _{q}^{n}}" loading="lazy"></span> which sends <i>C</i><sub>1</sub> isomorphically to <i>C</i><sub>2</sub> then we say <i>C</i><sub>1</sub> and <i>C</i><sub>2</sub> are <b>equivalent</b>.
</p><p><i>Lemma</i>: Any linear code is permutation equivalent to a code which is in standard form.
</p>
<div class="mw-heading mw-heading2"><h2 id="Bonisoli's_theorem">Bonisoli's theorem</h2></div>
<p>A code is defined to be <b>equidistant</b> if and only if there exists some constant <i>d</i> such that the distance between any two of the code's distinct codewords is equal to <i>d</i>.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> In 1984 Arrigo Bonisoli determined the structure of linear one-weight codes over finite fields and proved that every equidistant linear code is a sequence of <a href="Dual_code" title="Dual code">dual</a> <a href="Hamming_code" title="Hamming code">Hamming codes</a>.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Examples">Examples</h2></div>
<p>Some examples of linear codes include:
</p>
<style data-mw-deduplicate="TemplateStyles:r1184024115">
/* start https://en.wikipedia.org/ */
.mw-parser-output .div-col{margin-top:0.3em;column-width:30em}.mw-parser-output .div-col-small{font-size:90%}.mw-parser-output .div-col-rules{column-rule:1px solid #aaa}.mw-parser-output .div-col dl,.mw-parser-output .div-col ol,.mw-parser-output .div-col ul{margin-top:0}.mw-parser-output .div-col li,.mw-parser-output .div-col dd{page-break-inside:avoid;break-inside:avoid-column}
/* end https://en.wikipedia.org/ */
</style><div class="div-col" style="column-width: 27em;">
<ul><li><a href="Repetition_code" title="Repetition code">Repetition code</a></li>
<li><a href="Parity_code" class="mw-redirect" title="Parity code">Parity code</a></li>
<li><a href="Cyclic_code" title="Cyclic code">Cyclic code</a></li>
<li><a href="Hamming_code" title="Hamming code">Hamming code</a></li>
<li><a href="Golay_code_(disambiguation)" class="mw-redirect mw-disambig" title="Golay code (disambiguation)">Golay code</a>, both the <a href="Binary_Golay_code" title="Binary Golay code">binary</a> and <a href="Ternary_Golay_code" title="Ternary Golay code">ternary</a> versions</li>
<li><a href="Polynomial_code" title="Polynomial code">Polynomial codes</a>, of which <a href="BCH_code" title="BCH code">BCH codes</a> are an example</li>
<li><a href="Reed%E2%80%93Solomon_error_correction" title="Reed–Solomon error correction">Reed–Solomon codes</a></li>
<li><a href="Reed%E2%80%93Muller_code" title="Reed–Muller code">Reed–Muller code</a></li>
<li><a href="Algebraic_geometry_code" title="Algebraic geometry code">Algebraic geometry code</a></li>
<li><a href="Binary_Goppa_code" title="Binary Goppa code">Binary Goppa code</a></li>
<li><a href="Low-density_parity-check_codes" class="mw-redirect" title="Low-density parity-check codes">Low-density parity-check codes</a></li>
<li><a href="Expander_code" title="Expander code">Expander code</a></li>
<li><a href="Multidimensional_parity-check_code" title="Multidimensional parity-check code">Multidimensional parity-check code</a></li>
<li><a href="Toric_code" title="Toric code">Toric code</a></li>
<li><a href="Turbo_code" title="Turbo code">Turbo code</a></li>
<li><a href="Locally_recoverable_code" title="Locally recoverable code">Locally recoverable code</a></li></ul>
</div>
<div class="mw-heading mw-heading2"><h2 id="Generalization">Generalization</h2></div>
<p><a href="Hamming_space" title="Hamming space">Hamming spaces</a> over non-field alphabets have also been considered, especially over <a href="Finite_ring" title="Finite ring">finite rings</a>, most notably <a href="Galois_ring" title="Galois ring">Galois rings</a> over <a href="Modular_arithmetic" title="Modular arithmetic"><b>Z</b><sub>4</sub></a>. This gives rise to <a href="Module_(mathematics)" title="Module (mathematics)">modules</a> instead of vector spaces and ring-linear codes (identified with <a href="Submodule" class="mw-redirect" title="Submodule">submodules</a>) instead of linear codes. The typical metric used in this case the <a href="Lee_distance" title="Lee distance">Lee distance</a>. There exist a <a href="Gray_isometry" class="mw-redirect" title="Gray isometry">Gray isometry</a> between <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {Z} _{2}^{2m}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
<mi>m</mi>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {Z} _{2}^{2m}}</annotation>
</semantics>
</math></span><img src="./c95e46f6e851988f7bf14fed668b93831351f148.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.047ex; height:3.176ex;" alt="{\displaystyle \mathbb {Z} _{2}^{2m}}" loading="lazy"></span> (i.e. GF(2<sup>2<i>m</i></sup>)) with the Hamming distance and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {Z} _{4}^{m}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {Z} _{4}^{m}}</annotation>
</semantics>
</math></span><img src="./17ffb5c4a91673878356885f5d3401856c907eef.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.225ex; height:2.843ex;" alt="{\displaystyle \mathbb {Z} _{4}^{m}}" loading="lazy"></span> (also denoted as GR(4,m)) with the Lee distance; its main attraction is that it establishes a correspondence between some "good" codes that are not linear over <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {Z} _{2}^{2m}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
<mi>m</mi>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {Z} _{2}^{2m}}</annotation>
</semantics>
</math></span><img src="./c95e46f6e851988f7bf14fed668b93831351f148.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:4.047ex; height:3.176ex;" alt="{\displaystyle \mathbb {Z} _{2}^{2m}}" loading="lazy"></span> as images of ring-linear codes from <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {Z} _{4}^{m}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msubsup>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">Z</mi>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
<mrow class="MJX-TeXAtom-ORD">
<mi>m</mi>
</mrow>
</msubsup>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle \mathbb {Z} _{4}^{m}}</annotation>
</semantics>
</math></span><img src="./17ffb5c4a91673878356885f5d3401856c907eef.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:3.225ex; height:2.843ex;" alt="{\displaystyle \mathbb {Z} _{4}^{m}}" loading="lazy"></span>.<sup id="cite_ref-Greferath2009_6-0" class="reference"><a href="#cite_note-Greferath2009-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Lint1999_8-0" class="reference"><a href="#cite_note-Lint1999-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
</p><p>Some authors have referred to such codes over rings simply as linear codes as well.<sup id="cite_ref-DoughertyFacchini2015_9-0" class="reference"><a href="#cite_note-DoughertyFacchini2015-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Decoding_methods" title="Decoding methods">Decoding methods</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFWilliam_E._Ryan_and_Shu_Lin2009" class="citation book cs1">William E. Ryan and Shu Lin (2009). <span class="id-lock-limited" title="Free access subject to limited trial, subscription normally required"><a rel="nofollow" class="external text" href="https://archive.org/details/channelcodesclas00ryan"><i>Channel Codes: Classical and Modern</i></a></span>. Cambridge University Press. p. <a rel="nofollow" class="external text" href="https://archive.org/details/channelcodesclas00ryan/page/n21">4</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-521-84868-8</bdi>.</cite></span>
</li>
<li id="cite_note-DrMacKayECC-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-DrMacKayECC_2-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFMacKay2003" class="citation book cs1"><a href="David_J.C._MacKay" class="mw-redirect" title="David J.C. MacKay">MacKay, David, J.C.</a> (2003). <a rel="nofollow" class="external text" href="http://www.inference.phy.cam.ac.uk/itprnn/book.pdf"><i>Information Theory, Inference, and Learning Algorithms</i></a> <span class="cs1-format">(PDF)</span>. <a href="Cambridge_University_Press" title="Cambridge University Press">Cambridge University Press</a>. p. 9. <a href="Bibcode_(identifier)" class="mw-redirect" title="Bibcode (identifier)">Bibcode</a>:<a rel="nofollow" class="external text" href="https://ui.adsabs.harvard.edu/abs/2003itil.book.....M">2003itil.book.....M</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>9780521642989</bdi>. <q>In a <i>linear</i> block code, the extra <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle N-K}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>N</mi>
<mo>−<!-- − --></mo>
<mi>K</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle N-K}</annotation>
</semantics>
</math></span><img src="./af4f62a05585d80e2056fb27022b11d0028e4e1b.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.505ex; width:6.97ex; height:2.343ex;" alt="{\displaystyle N-K}" loading="lazy"></span> bits are linear functions of the original <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle K}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>K</mi>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle K}</annotation>
</semantics>
</math></span><img src="./2b76fce82a62ed5461908f0dc8f037de4e3686b0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:2.066ex; height:2.176ex;" alt="{\displaystyle K}" loading="lazy"></span> bits; these extra bits are called <i>parity-check bits</i></q></cite><span class="cs1-maint citation-comment"><code class="cs1-code">{{cite book}}</code>: CS1 maint: multiple names: authors list (link)</span></span>
</li>
<li id="cite_note-Cover_and_Thomas-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-Cover_and_Thomas_3-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFThomas_M._Cover_and_Joy_A._Thomas1991" class="citation book cs1">Thomas M. Cover and Joy A. Thomas (1991). <a rel="nofollow" class="external text" href="https://archive.org/details/elementsofinform0000cove/page/210"><i>Elements of Information Theory</i></a>. John Wiley & Sons, Inc. pp. <a rel="nofollow" class="external text" href="https://archive.org/details/elementsofinform0000cove/page/210">210–211</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-471-06259-2</bdi>.</cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite id="CITEREFEtzion,_TuviRaviv,_Netanel2013" class="citation arxiv cs1">Etzion, Tuvi; Raviv, Netanel (2013). "Equidistant codes in the Grassmannian". <a href="ArXiv_(identifier)" class="mw-redirect" title="ArXiv (identifier)">arXiv</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://arxiv.org/abs/1308.6231">1308.6231</a></span> [<a rel="nofollow" class="external text" href="https://arxiv.org/archive/math.CO">math.CO</a>].</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite id="CITEREFBonisoli,_A.1984" class="citation journal cs1">Bonisoli, A. (1984). "Every equidistant linear code is a sequence of dual Hamming codes". <i>Ars Combinatoria</i>. <b>18</b>: <span class="nowrap">181–</span>186.</cite></span>
</li>
<li id="cite_note-Greferath2009-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-Greferath2009_6-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFMarcus_Greferath2009" class="citation book cs1">Marcus Greferath (2009). "An Introduction to Ring-Linear Coding Theory". In Massimiliano Sala; Teo Mora; Ludovic Perret; Shojiro Sakata; Carlo Traverso (eds.). <i>Gröbner Bases, Coding, and Cryptography</i>. Springer Science & Business Media. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-3-540-93806-4</bdi>.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.encyclopediaofmath.org/index.php/Main_Page">"Encyclopedia of Mathematics"</a>. <i>www.encyclopediaofmath.org</i>.</cite></span>
</li>
<li id="cite_note-Lint1999-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-Lint1999_8-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFJ.H._van_Lint1999" class="citation book cs1">J.H. van Lint (1999). <span class="id-lock-registration" title="Free registration required"><a rel="nofollow" class="external text" href="https://archive.org/details/introductiontoco0000lint_a3b9"><i>Introduction to Coding Theory</i></a></span> (3rd ed.). Springer. Chapter 8: Codes over ℤ<sub>4</sub>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-3-540-64133-9</bdi>.</cite></span>
</li>
<li id="cite_note-DoughertyFacchini2015-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-DoughertyFacchini2015_9-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFS.T._DoughertyJ.-L._KimP._Sole2015" class="citation book cs1">S.T. Dougherty; J.-L. Kim; P. Sole (2015). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=psrXBgAAQBAJ&pg=PA80">"Open Problems in Coding Theory"</a>. In Steven Dougherty; Alberto Facchini; Andre Gerard Leroy; Edmund Puczylowski; Patrick Sole (eds.). <i>Noncommutative Rings and Their Applications</i>. American Mathematical Soc. p. 80. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-1-4704-1032-2</bdi>.</cite></span>
</li>
</ol></div>
<div class="mw-heading mw-heading3"><h3 id="Bibliography">Bibliography</h3></div>
<ul><li><cite id="CITEREFJ._F._HumphreysM._Y._Prest2004" class="citation book cs1">J. F. Humphreys; M. Y. Prest (2004). <i>Numbers, Groups and Codes</i> (2nd ed.). Cambridge University Press. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-511-19420-7</bdi>.</cite> Chapter 5 contains a more gentle introduction (than this article) to the subject of linear codes.</li></ul>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><a rel="nofollow" class="external text" href="https://web.archive.org/web/20070927213247/http://jason.mchu.com/QCode/index.html"><i>q</i>-ary code generator program</a></li>
<li><a rel="nofollow" class="external text" href="http://www.codetables.de/">Code Tables: Bounds on the parameters of various types of codes</a>, <i>IAKS, Fakultät für Informatik, Universität Karlsruhe (TH)]</i>. Online, up to date table of the optimal binary codes, includes non-binary codes.</li>
<li><a rel="nofollow" class="external text" href="http://z4codes.info/">The database of Z4 codes</a> Online, up to date database of optimal Z4 codes.</li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2024-11-28" href="https://en.wikipedia.org/wiki/?title=Linear_code&oldid=1259978043">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>